public class primeNumber {
    public static void main(String[] args) {
        int number = 0;
        int a = 0;
        for (int i = 100; i > 1; i--) {
            for (int j = 2; j < i; j++) {
                if (i % j == 0) {
                    a++;
                }
            }
            if (a == 0) {
                System.out.println(i + "是质数");
                number++;
            } else {
                a = 0;
            }
        }
        System.out.println("一百以内一共有" + number + "个质数");
    }
}
